/**
* FileName: SqlUtil.java
* @Description: TODO(用一句话描述该文件做什么)
* All rights Reserved, Designed By 21winmess
* Copyright: Copyright(C) 2010-2011 
* Company 21winmess DaLian LTD.
* @author: Matrix xu
* @version V2.0
* Createdate: 2012-12-10 下午4:27:04
*
* Modification History:
* Date Author Version Discription
* -----------------------------------------------------------------------------------
* 2012-12-10 Qute_Android2.0
* Why & What is modified: <修改原因描述>
*/
package com.me.safebox.data;

/**
 * @ClassName: SqlUtil
 * @Description:TODO(这里用一句话描述这个类的作用)
 * @author: Matrix
 * @date: 2012-12-10 下午4:27:04
 *
 */
public class SqlUtil {
	
	public static final String SAFE_FILE_TABLE_NAME = "safe_file";
	
	public static final String SAFE_FOLDER_TABLE_NAME = "safe_folder";

	public static final String PREFIX_CREATE_TB = "CREATE TABLE IF NOT EXISTS ";
	
	public static final String  COLUMN_PK = "_id";
	public static final String COLUMN_FILE_TYPE = "type";//文件类型
	public static final String COLUMN_SOURCE_PATH = "source_dir";//源文件所在目录
	public static final String COLUMN_DES_PATH = "des_path";//原始文件地址
	public static final String COLUMN_CREATE_DATA = "create_data";//创建加密文件时间
	public static final String COLUMN_FILE_NAME = "source_name";//源文件名称
	public static final String COLUMN_FOLDER_FK = "folder_id";//相册ID
	
	
	public static final String COLUMN_FOLDER_LABLE = "lable";//标签
	public static final String COLUMN_FOLDER_TYPE = "type";//私密文件夹类型

	public static final String SQL_CREATE_ENCRY_FILE_TABLE = PREFIX_CREATE_TB + SAFE_FILE_TABLE_NAME 
			+ "(" 
			+ COLUMN_PK + " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, " 
			+ COLUMN_FILE_TYPE  + " INTEGER, "  
			+ COLUMN_SOURCE_PATH + " TEXT, " 
			+ COLUMN_DES_PATH + " TEXT, "
			+ COLUMN_FILE_NAME + " TEXT, "
			+ COLUMN_CREATE_DATA + " INTEGER, "
			+ COLUMN_FOLDER_FK + " INTEGER DEFAULT(0)" 
			+ ")";
	
	public static final String SQL_CREATE_FOLDER_TABLE = PREFIX_CREATE_TB + SAFE_FOLDER_TABLE_NAME
			+ "(" 
			+ COLUMN_PK + " INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, " 
			+ COLUMN_FOLDER_LABLE  + " TEXT, " 
			+ COLUMN_FOLDER_TYPE  + " INTEGER, " 
			+ COLUMN_CREATE_DATA + " INTEGER"
			+ ")";
}
